On the Period of the Linear Congruential and Power Generators
نویسندگان
چکیده
This sequence was first considered as a pseudorandom number generator by D. H. Lehmer. For the power generator we are given integers e, n > 1 and a seed u = u0 > 1, and we compute the sequence ui+1 = u e i (mod n) so that ui = u ei (mod n). A popular case is e = 2, which is called the Blum–Blum–Shub (BBS) generator. Both of these generators are periodic sequences, and it is of interest to compute the periods. To be useful, a pseudorandom number generator should have a long period. In this paper we consider the problem of the period statistically as n varies, either over all integers, or over certain subsets of the integers that are used in practice, namely the set of primes and the set of “RSA moduli,” that is, numbers which are the product of two primes of the same magnitude. If (e, n) = 1, then the sequence e (mod n) is purely periodic and its period is the least positive integer k with e ≡ 1 (mod n). We denote this order as ord(e, n). If (e, n) > 1, the sequence e (mod n) is still (ultimately) periodic, with the period given by ord(e, n(e)) where n(e) is the largest divisor of n that is coprime to e. (The aperiodic lead-in to such a sequence has length bounded by the binary logarithm of n.) In this paper we shall denote ord(e, n(e)) by ord (e, n). The periods of both the linear congruential and
منابع مشابه
On the Period of the Linear Congruential and Power Generators Pär Kurlberg and Carl Pomerance
This sequence was first considered as a pseudorandom number generator by D. H. Lehmer. For the power generator we are given integers e, n > 1 and a seed u0 > 1, and we compute the sequence ui+1 = u e i (mod n) so that ui = u ei 0 (mod n). A popular case is e = 2, which is called the Blum–Blum–Shub (BBS) generator. Both of these generators are periodic sequences, and it is of interest to compute...
متن کاملOn the Performance of Birthday Spacings Tests with Certain Families of Random Number Generators
We examine how a statistical test based on discrete spacings between points, in 1 or more dimensions, detects the regularities in certain popular classes of random number generators. We provide a rule of thumb giving the minimal sample size for the test to reject the generator systematically, as a function of the generator's size (or period length), for generator families such as the linear con...
متن کاملParallel Linear Congruential Generators with Prime Moduli
Linear congruential generators (LCGs) remain the most popular method of pseudorandom number generation on digital computers. Ease of implementation has favored implementing LCGs with power-of-two moduli. However, prime modulus LCGs are superior in quality to power-of-two modulus LCGs, and the use of a Mersenne prime minimizes the computational cost of generation. When implemented for parallel c...
متن کاملCompound Inversive Congruential Generator Design Algorithm
In this paper we present an algorithm for the compound method of designing generators as pseudorandom stream sources. Compound method relies on a technique of combining two or more inversive congruential generators. Experiments on congruential methods showed that even if all tested generators have maximum period not all produced binary sequences have the linear complexity of the same value. We ...
متن کاملOn the Linear Complexity Profile of Nonlinear Congruential Pseudorandom Number Generators with Dickson Polynomials
Linear complexity and linear complexity profile are important characteristics of a sequence for applications in cryptography and MonteCarlo methods. The nonlinear congruential method is an attractive alternative to the classical linear congruential method for pseudorandom number generation. Recently, a weak lower bound on the linear complexity profile of a general nonlinear congruential pseudor...
متن کامل